home *** CD-ROM | disk | FTP | other *** search
/ 220 Jogos / 220 jogos.iso / tetris / tetron / SOURCE / TIMER.H < prev    next >
Encoding:
C/C++ Source or Header  |  2002-08-13  |  1.3 KB  |  43 lines

  1. //----------------------------------------------------------------------------------------
  2. //----------------------------------------------------------------------------------------
  3. //
  4. //        Filename        :    timer.h
  5. //        Description        :    Header file for Timer class
  6. //        Author            :   Marnich van Rensburg (2002)
  7. //
  8. //----------------------------------------------------------------------------------------
  9. //----------------------------------------------------------------------------------------
  10.  
  11. #include <stdarg.h>    
  12. #include <stdio.h>    
  13. #include <windows.h>
  14.  
  15. #ifndef TIMER_H
  16. #define TIMER_H
  17.  
  18. class Timer
  19. {
  20.     public:
  21.     
  22.         Timer();
  23.         float GetTime();
  24.         bool CheckFreq(float Freq);
  25.  
  26.     private:
  27.  
  28.         float Start;
  29.  
  30.         struct                                                         // Create A Structure For The Timer Information
  31.         {
  32.           __int64       frequency;                                    // Timer Frequency
  33.           float         resolution;                                    // Timer Resolution
  34.           unsigned long mm_timer_start;                                // Multimedia Timer Start Value
  35.           unsigned long mm_timer_elapsed;                            // Multimedia Timer Elapsed Time
  36.           bool            performance_timer;                            // Using The Performance Timer?
  37.           __int64       performance_timer_start;                    // Performance Timer Start Value
  38.           __int64       performance_timer_elapsed;                    // Performance Timer Elapsed Time
  39.         } TimerData;                                                        // Structure Is Named timer
  40.  
  41. };// Tmr
  42.  
  43. #endif;